
package com.jf.cloud.distribution.dto;

import com.jf.cloud.common.util.PriceUtil;
import io.swagger.v3.oas.annotations.media.Schema;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import java.math.BigDecimal;

/**
 * 分销员钱包信息DTO
 *
 * @author zz
 * @date 2021-08-09 14:14:10
 */
public class DistributionUserWalletDTO{
    private static final long serialVersionUID = 1L;

    @Schema(description = "分销员钱包id" )
    private Long walletId;

    @Schema(description = "分销员id" )
    private Long distributionUserId;

    @Schema(description = "待结算金额" )
    @Max(value = PriceUtil.MAX_AMOUNT, message = "最大值不能超过" + PriceUtil.MAX_AMOUNT)
    @Min(value = Long.MIN_VALUE, message = "最小值不能小于" + Long.MIN_VALUE)
    private BigDecimal unsettledAmount;

    @Schema(description = "可提现金额" )
    @Max(value = PriceUtil.MAX_AMOUNT, message = "最大值不能超过" + PriceUtil.MAX_AMOUNT)
    @Min(value = Long.MIN_VALUE, message = "最小值不能小于" + Long.MIN_VALUE)
    private BigDecimal settledAmount;

    @Schema(description = "已失效金额" )
    @Max(value = PriceUtil.MAX_AMOUNT, message = "最大值不能超过" + PriceUtil.MAX_AMOUNT)
    @Min(value = Long.MIN_VALUE, message = "最小值不能小于" + Long.MIN_VALUE)
    private BigDecimal invalidAmount;

    @Schema(description = "积累收益" )
    @Max(value = PriceUtil.MAX_AMOUNT, message = "最大值不能超过" + PriceUtil.MAX_AMOUNT)
    @Min(value = Long.MIN_VALUE, message = "最小值不能小于" + Long.MIN_VALUE)
    private BigDecimal accumulateAmount;

    @Schema(description = "乐观锁" )
    private Integer version;

    @Schema(description = "钱包状态(-1 已冻结 0未生效(分销审核未通过) 1正常)" )
    private Integer state;

    @Schema(description = "可提现的改变金额" )
    private Long changeAmount;

    public Long getChangeAmount() {
        return changeAmount;
    }

    public void setChangeAmount(Long changeAmount) {
        this.changeAmount = changeAmount;
    }

    public Long getWalletId() {
        return walletId;
    }

    public void setWalletId(Long walletId) {
        this.walletId = walletId;
    }

    public Long getDistributionUserId() {
        return distributionUserId;
    }

    public void setDistributionUserId(Long distributionUserId) {
        this.distributionUserId = distributionUserId;
    }

    public BigDecimal getUnsettledAmount() {
        return unsettledAmount;
    }

    public void setUnsettledAmount(BigDecimal unsettledAmount) {
        this.unsettledAmount = unsettledAmount;
    }

    public BigDecimal getSettledAmount() {
        return settledAmount;
    }

    public void setSettledAmount(BigDecimal settledAmount) {
        this.settledAmount = settledAmount;
    }

    public BigDecimal getInvalidAmount() {
        return invalidAmount;
    }

    public void setInvalidAmount(BigDecimal invalidAmount) {
        this.invalidAmount = invalidAmount;
    }

    public BigDecimal getAccumulateAmount() {
        return accumulateAmount;
    }

    public void setAccumulateAmount(BigDecimal accumulateAmount) {
        this.accumulateAmount = accumulateAmount;
    }

    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    @Override
    public String toString() {
        return "DistributionUserWalletDTO{" +
                "walletId=" + walletId +
                ", distributionUserId=" + distributionUserId +
                ", unsettledAmount=" + unsettledAmount +
                ", settledAmount=" + settledAmount +
                ", invalidAmount=" + invalidAmount +
                ", accumulateAmount=" + accumulateAmount +
                ", version=" + version +
                ", state=" + state +
                '}';
    }
}
